package com.yuyou.tas.util.enums.admin;

public class CommDataConfigEnums {
	
	/**
	 * 类别：1：科目，2：教材版本，3：年份，4：资料类型，5：期类型，6：题目类型
	 *
	 */
	public enum category{		
		subject(1,"subject"),
		material(2,"material"),
		year(3,"year"),
		suff(4,"suff"),
		timeType(5,"timeType"),
		questionType(6,"questionType"),
		;		
		category(Integer value,String categoryCode){
			this.value=value;
			this.categoryCode=categoryCode;
		}		
		private Integer value;
		private String categoryCode;
		
		public Integer getValue() {
			return value;
		}
		public String getCategoryCode() {
			return categoryCode;
		}
		public void setCategoryCode(String categoryCode) {
			this.categoryCode = categoryCode;
		}	
		
		public static String getCodeByValue(Integer value){		
			for (category e : category.values()) {  
				if(e.getValue()==value){
					return e.getCategoryCode();
				}
			} 			
			return"";
		}
		
	}
	

	

}
